package com.sunny.ihealth;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.jaeger.library.StatusBarUtil;

public class VisitorActivity extends BaseActivity implements View.OnClickListener {

    private Button btnLogin, btnRegister, btnTry;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_visitor);

        initViews();
    }


    private void initViews() {
        StatusBarUtil.setTranslucent(this, 50);

        btnLogin = (Button) findViewById(R.id.btn_visitor_login);
        btnRegister = (Button) findViewById(R.id.btn_visitor_register);
        btnTry = (Button) findViewById(R.id.btn_visitor_try);

        btnLogin.setOnClickListener(this);
        btnRegister.setOnClickListener(this);
        btnTry.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_visitor_login:
                intent = new Intent(VisitorActivity.this, LoginActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_visitor_register:
                intent = new Intent(VisitorActivity.this, RegisterActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_visitor_try:
                intent = new Intent(VisitorActivity.this, MainActivity.class);
                startActivity(intent);
                break;
        }
    }
}
